<?php
    $a = array(
        'name'=>'nihao',
        'sex'=>'nan',

    );




/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 15-8-17
 * Time: 上午10:52
 */
$ac1 = "124318";
$pw1 = "2002cb782f68481ebd5ec534bfff9e02"; //票付通账号跟密码

$s1=new SoapClient("http://open.12301.cc/openService/MXSE.wsdl",array('encoding' =>'UTF-8','cache_wsdl' => 0));//票付通接口地址
$time = time();
for($i= 0;$i<1;$i++){
$str = ($s1->__soapCall("PFT_Order_Submit", array("ac" => $ac1, "pw" => $pw1, "in0" =>9568, "in1" =>20006, "in2" => "$time"."$i", "in3" => 200, "in4" =>1, "in5" => "2015-08-10", "in6" => "客户名称", "in7" => "18396533082", "in8" => "", "in9" => 1, "in10" => 2, "in11" => 0, "in12" => "", "in13" => "", "in14" => 0, "in15" => 0, "in16" =>35707, "in17" => "")));

$object  =  (simplexml_load_string($str));
$txt = (json_encode($object->Rec)).$i;
logfile($txt,'message.txt');
}
function logfile($txt,$path)
{
    $fp = fopen($path, "a");
    flock($fp, LOCK_EX);
    fwrite($fp, $txt . "\n");
    flock($fp, LOCK_UN);
    fclose($fp);
}


